-
Notifications
You must be signed in to change notification settings - Fork 51
Update the redis backend #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
I made a few changes to this, namely
|
This is now pretty solid. It's confirmed to work (on Heroku) for our basic usecase. I'd still like to do a couple benchmarks to see how this performs locally and over the network. But for now, any comments on the implementation itself? |
Hopefully correct this time: - iterating with globs assumes the glob is a full name, e.g. 'refs/heads/test-*' or 'H*' - iterating without a glob uses a default glob of 'refs/*'
This may be wrong, but turning off pkg-config in FindLibgit2.cmake makes cmake respect library paths given from the command line (with -D)
bump. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Redis backend overhaul to enable real use as storage for bare repositories.
This is my first pull request to libgit2 and I'm not entirely familiar with all the conventions so I may have missed better options to do things. I'll welcome all comments and suggestions of improvement.
What's been done
I understand that a redis backend will be slow, especially when used over the network, but I still think it's worth it. My single most important use-case is to enable using git repositories on Heroku or similar app container, which doesn't have a writable file system (not coincidentally, that's also my use-case). It also enables the use of ephemeral, in-memory repositories for cases like undo history without going all out with in-memory storage, etc.
My end goal is to enable switching backends in rugged for ruby/rails apps. I will open a PR to that end soon(-ish) but this can go in first and independently (almost, see below).
For now, the backend is tested through rugged and the tests depend on my hacked-in support for redis backend (see here if interested, but it's probably not worth it). You'll basically have to trust me it works :).
It would be really good to add testing support to libgit2-backends itself. I'm willing to give it a shot if anyone can provide pointers on how best to do it.
Example repo
Issues
I see the following problems with the implementation:
/cc @mhodgson, @arthurschreiber